$(function () {
    function zhankai() {
        $(".item-intro div").css({ "height": "auto" }) //height:auto 自适应高度
        $(".item-intro div a").text("收起")
    }

    function shouqi() {
        $(".item-intro div").css({ "height": "300px" })
        $(".item-intro div a").text("展开全文")
    }

    var index = 0
    $(".item-intro div a").click(function () {
        index++
        if (index % 2 == 0) {
            shouqi()
            console.log("2")

        } else {
            zhankai()
            console.log("1")
        }

    });


})
$(function () {
    var index = 0
    $(".related .right .left").click(function () {
        index++
        if (index == 4) {
            $(".related .related-list").animate({ left: -330 * index }, 500, function () {
                $(".related-list").css({ "left": 0 })
            })
            index = 0
        } else {
            $(".related .related-list").animate({ left: -330 * index }, 500)
        }
    })

    $(".related .right .right").click(function () {
        index--
        if (index == -1) {
            $(".related-list").css({ "left": -330 * 4 })
            index = 3
        }
        $(".related .related-list").animate({ "left": -330 * index }, 500)
    })
})
